# -*- coding: utf-8 -*-

from sqlalchemy import Column, String, Numeric, DateTime
from com.maycur.utils.MySqlUtils import Base


class Attachment(Base):
    __tablename__ = 'attachment'

    code = Column('code', String, primary_key=True)
    ent_code = Column('ent_code', String)
    resource_key = Column('resource_key', String)
    file_name = Column('filename', String)
    file_type = Column('type', String)
    associated_with = Column('associated_with', String)
    coordinates = Column('coordinates', String)
    orientation = Column('orientation', Numeric)
    created_at = Column('created_at', DateTime)

    def __repr__(self):
        return f"Attachment(ent_code='{self.ent_code}', resource_key='{self.resource_key}', associated_with='{self.associated_with}')"



